var router = function ($urlRouterProvider, $stateProvider) {
    
    
  $stateProvider

     //景区列表
     .state('app.scenicAreaList', {
         url: "/scenic/scenicAreaList",
         views: {
             'main@': {
                 template: require('./views/ScenicAreaList.html'),
                 controller: 'scenicAreaList',
             }
         },
         resolve: {
          stateup: function (electronicfenceservice) {
            return electronicfenceservice.stateup();
          },
          statedown: function (electronicfenceservice) {
            return electronicfenceservice.statedown();
          },
          delflgdel: function (electronicfenceservice) {
            return electronicfenceservice.delflgdel();
          }
         }
     })

     // 景点列表
     .state('app.scenicSpotList', {
      url: "/scenic/scenicSpotList/:code",
      views: {
          'main@': {
              template: require('./views/ScenicSpotList.html'),
              controller: 'scenicSpotList',
          }
      },
      resolve: {
        spotstateup: function (electronicfenceservice) {
          return electronicfenceservice.spotstateup();
        },
        spotstatedown: function (electronicfenceservice) {
          return electronicfenceservice.spotstatedown();
        },
        spotdelflgdel: function (electronicfenceservice) {
          return electronicfenceservice.spotdelflgdel();
        }
      }
  })



   // 创建景点
   .state('app.createSpot', {
    url: "/scenic/createSpot/:code/:scenicspot_id",
    views: {
        'main@': {
            template: require('./views/CreateSpot.html'),
            controller: 'createSpot',
        }
    },
    resolve: {

    }
})
   // 用户列表
   .state('app.scenicuser', {
    url: "/scenic/scenicuser",
    views: {
        'main@': {
            template: require('./views/user.html'),
            controller: 'user',
        }
    },
    resolve: {

    }
})

}



    
module.exports = router;